namespace ShortUrl.WebUI.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class First : DbMigration
    {
        public override void Up()
        {
            DropIndex("dbo.UrlLinks", "IX_ShortUrl");
            DropIndex("dbo.UrlLinks", new[] { "UrlLong" });
            AlterColumn("dbo.UrlLinks", "ShortKey", c => c.String(nullable: false, maxLength: 10));
            AlterColumn("dbo.UrlLinks", "UrlLong", c => c.String(nullable: false, maxLength: 255));
            CreateIndex("dbo.UrlLinks", "ShortKey", unique: true, name: "IX_ShortUrl");
            CreateIndex("dbo.UrlLinks", "UrlLong", unique: true);
        }
        
        public override void Down()
        {
            DropIndex("dbo.UrlLinks", new[] { "UrlLong" });
            DropIndex("dbo.UrlLinks", "IX_ShortUrl");
            AlterColumn("dbo.UrlLinks", "UrlLong", c => c.String(maxLength: 255));
            AlterColumn("dbo.UrlLinks", "ShortKey", c => c.String(maxLength: 10));
            CreateIndex("dbo.UrlLinks", "UrlLong", unique: true);
            CreateIndex("dbo.UrlLinks", "ShortKey", unique: true, name: "IX_ShortUrl");
        }
    }
}
